import {request} from '@/utils/request'

const apiUrl = '/api/v1/farm'

export function list() {
  return request({
    url: apiUrl + '/list',
    method: 'get'
  })
}

//创建
export function add(data) {
  return request({
    url: apiUrl,
    method: 'post',
    data
  })
}

//编辑
export function edit(data) {
  return request({
    url: apiUrl,
    method: 'put',
    data
  })
}

//删除
export function del(id) {
  return request({
    url: apiUrl + id,
    method: 'delete'
  })
}

